package abhiWeb.com.abhi.presentation.header.action;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;
import org.omg.CORBA.SystemException;

import abhiWeb.com.abhi.presentation.common.AbhiForwardConstants;
import abhiWeb.com.abhi.presentation.header.form.HeaderForm;

public class HeaderAction extends DispatchAction{

	
	public ActionForward loadHome(ActionMapping actionMapping,
			ActionForm actionForm, HttpServletRequest request,
			HttpServletResponse response) throws Exception{
		
		ActionForward actionForward = null;
		try{
			HeaderForm headerForm = (HeaderForm) actionForm;
			actionForward = actionMapping.findForward(AbhiForwardConstants.FORWARD_HOME);
			
		}
		catch(SystemException se)
		{
			se.printStackTrace();
		}
		return actionForward;
	}
	
	public ActionForward loadVideoTutorials(ActionMapping actionMapping,
			ActionForm actionForm, HttpServletRequest request,
			HttpServletResponse response) throws Exception{
		
		ActionForward actionForward = null;
		try{
			HeaderForm headerForm = (HeaderForm) actionForm;
			actionForward = actionMapping.findForward(AbhiForwardConstants.FORWARD_VIDEO_TUTORIALS);
			
		}
		catch(SystemException se)
		{
			se.printStackTrace();
		}
		return actionForward;
	}
	
	public ActionForward loadQuestionPapers(ActionMapping actionMapping,
			ActionForm actionForm, HttpServletRequest request,
			HttpServletResponse response) throws Exception{
		
		ActionForward actionForward = null;
		try{
			HeaderForm headerForm = (HeaderForm) actionForm;
			actionForward = actionMapping.findForward(AbhiForwardConstants.FORWARD_QUESTION_PAPERS);
			
		}
		catch(SystemException se)
		{
			se.printStackTrace();
		}
		return actionForward;
	}
	
	public ActionForward loadReviews(ActionMapping actionMapping,
			ActionForm actionForm, HttpServletRequest request,
			HttpServletResponse response) throws Exception{
		
		ActionForward actionForward = null;
		try{
			HeaderForm headerForm = (HeaderForm) actionForm;
			actionForward = actionMapping.findForward(AbhiForwardConstants.FORWARD_REVIEWS);
			
		}
		catch(SystemException se)
		{
			se.printStackTrace();
		}
		return actionForward;
	}
	
	
}
